import Vue from 'vue'
import Vuex from 'vuex'

Vue.use(Vuex)

export default new Vuex.Store({
  state: {
    cityName:localStorage.getItem('cityName'),
    cityId:localStorage.getItem('cityId'),
    status:JSON.parse(localStorage.getItem('status'))

  },
  mutations: {
    setCityName(state){
      state.cityName=localStorage.getItem('cityName')
    },
    setCityId(state){
      state.cityId=localStorage.getItem('cityId')
    },
    setStatus(state){
      state.status=JSON.parse(localStorage.getItem('status'))
    },
    removeStatus(state){
      state.status=JSON.parse(localStorage.getItem('status'))
    }

  },
  actions: {

  }
})
